const void * key const void * base size_t count size_t size int (* comparefunction(const void * const void *
FUNCTION
Search in a sorted array for an entry key.
INPUTS
key
Look for this key.
base
This is the address of the first element in the array
to be searched. Note that the array *must* be sorted.
count
The number of elements in the array
size
The size of one element
comparefunction
The function which is called when two elements
must be compared. The function gets the addresses of two
elements of the array and must return 0 is both are equal,
< 0 if the first element is less than the second and > 0
otherwise.
RESULT
A pointer to the element which equals key in the array or NULL if
no such element could be found.